<template>
<div class="global-error-page">
    <common-authorized 
        class="common-error-class" 
        type="unauthorized" 
        :loading="loading"
        :hardwareInfo="hardwareInfo"
        :message="message"></common-authorized>
  </div>
    
</template>

<script>
import {gethardwareinfo} from '@/api/unauthorized'
export default {
  name: 'unauthorized',
  data(){
   return {
        message: null,
        loading: false,
        hardwareInfo: null
   }
  },
  methods: {
    gethardwareinfo() {
        this.loading = true
        gethardwareinfo().then(res => {
            if(res && res.code === 200) {
                this.hardwareInfo = res.data.signture
            } else {
                this.hardwareInfo = null
            }
        }).catch(() => this.hardwareInfo = null).finally(() => this.loading = false)
    }
  },
  mounted() {
    this.message = this.$route.query.msg
    this.gethardwareinfo()
  },
}
</script>

<style scoped lang="scss">
.global-error-page {
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;

  .common-error-class {
    width: 600px;
    height: 300px
  }
}
</style>
